#!/usr/bin/env bash
username="ubuntu"
filename="/home/$username/filename.txt"
i=0
for line in `cat ip.txt`
do
	i=$(($i+1))  
	scp $username@$line:"$filename" $line.txt
done

